<!DOCTYPE html
    PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:py="http://genshi.edgewall.org/"
      xmlns:xi="http://www.w3.org/2001/XInclude"
      xmlns:i18n="http://genshi.edgewall.org/i18n">
  <xi:include href="layout.html" />
  <head>
    <title>$title</title>
    <meta name="ROBOTS" content="NOINDEX, NOFOLLOW" />
  </head>

  <body>
    <div id="content" class="ticket">
      <h1 i18n:msg="name">Change History for <a href="${url or url_of(resource)}">${name or name_of(resource)}</a></h1>

      <form py:if="history" class="printableform" method="get" action="">
        <div class="buttons">
          <input type="hidden" name="action" value="${diff_action or 'diff'}" />
          <input py:for="k, v in diff_args or []" type="hidden" name="$k" value="$v"/>
          <input type="submit" value="${_('View changes')}" />
        </div>
        <table id="fieldhist" class="listing" summary="Change history">
          <thead>
            <tr>
              <th class="diff"></th>
              <th class="version">Version</th>
              <th class="date">Date</th>
              <th class="author">Author</th>
              <th class="comment">Comment</th>
            </tr>
          </thead>
          <tbody>
            <tr py:for="idx, item in enumerate(history)" class="${idx % 2 and 'odd' or 'even'}">
              <td class="diff">
                <input type="radio" name="old_version" value="$item.version"
                       checked="${idx == 1 or None}" />
                <input type="radio" name="version" value="$item.version"
                       checked="${idx == 0 or None}" />
              </td>
              <td class="version">
                <a href="${item.url or url_of(resource, version=item.version)}" title="View this version">$item.version</a>
              </td>
              <td class="date">${dateinfo(item.date)}</td>
              <td class="author"
                  title="${show_ip_addresses and item.ipnr 
                           and _('IP-Address: %(ipnr)s', ipnr=item.ipnr) or None}">${authorinfo(item.author)}</td>
              <td class="comment">${wiki_to_oneliner(context(resource), item.comment, shorten=True)}</td>
            </tr>
          </tbody>
        </table>
        <py:if test="len(history) &gt; 10">
          <div class="buttons">
            <input type="submit" value="${_('View changes')}" />
          </div>
        </py:if>
      </form>
    </div>
  </body>
</html>
